package com.fact.actions;

import java.util.Map;

import org.apache.struts2.dispatcher.SessionMap;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionContext;

public class Logout extends BaseAction implements SessionAware
{

	private Map<String,Object> session;
	
	private static final long serialVersionUID = 676279166081085432L;
	
	public String execute()
	{
		if(session instanceof SessionMap)
		{
			((SessionMap<String,Object>)session).invalidate();
			this.session=ActionContext.getContext().getSession();
		}
		return "success";
	}

	public Map<String, Object> getSession() {
		return session;
	}

	public void setSession(Map<String, Object> session) {
		this.session = session;
	}

	
}
